package com.login.service.user;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.login.dao.impl.SalerDaoImpl;



/**
 * Servlet implementation class DeleteSellerServlet
 */
public class DeleteSellerServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	SalerDaoImpl selerImpl=new SalerDaoImpl(); 
    /**
     * @see HttpServlet#HttpServlet()
     */
    public DeleteSellerServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String SellerName=request.getParameter("name");
		System.out.println("所删除的卖家用户名是："+SellerName);
		int result=selerImpl.deleteSaler(SellerName);
		if(result!=0){
			request.getRequestDispatcher("SellerList").forward(request, response);
		}
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
